Page({
  data:{
    announcementList:[],
  },
  onLoad(){
    // 发送请求获取公告列表
    this.getAnnouncement()
  },
  async getAnnouncement(){
    const res=await wx.http({
      url:'/announcement',
    })
    console.log(res);
    this.setData({
      announcementList:res.data,
    })
  }
})
